//
//  URLFather.h
//  JinYong_iOS_Store
//
//  Created by 王厚一 on 2017/10/17.
//  Copyright © 2017年 why. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^successBlock)(NSDictionary *result);
typedef void (^failureBlock)(NSError *error);

@interface URLFather : NSObject

DEF_SINGLETON(URLFather)

#pragma mark --------------------------- 账号密码登录 ----------------------------------
- (void)loginWithMobile:(NSString *)mobile password:(NSString *)password success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 登录的验证码 -----------------------------
- (void)getLoginCodeWithMobile:(NSString *)mobile success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 使用验证码登录 ----------------------------------
- (void)loginWithMobile:(NSString *)mobile code:(NSString *)code success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 忘记密码的验证码 ----------------------------------
- (void)getResetCodeWithMobile:(NSString *)mobile success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 忘记密码 ----------------------------------------
- (void)resetPasswdWithMobile:(NSString *)mobile code:(NSString *)code passwd:(NSString *)passwd success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 首页数据 ----------------------------------------
- (void)loadMainDataWithSuccess:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 退出登录 ----------------------------------------
- (void)logoutWithSuccess:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 订单列表 ----------------------------------------
- (void)getOrderListWithType:(NSString *)orderType firstRow:(NSString *)firstRow listRows:(NSString *)listRows success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 确认送达 ----------------------------------------
- (void)orderArrivedWithOrderID:(NSString *)orderID success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 取消订单 ----------------------------------------
- (void)orderCanceledWithOrderID:(NSString *)orderID success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 接单 -------------------------------------------
- (void)orderReceiveWithOrderID:(NSString *)orderID success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 拒单 -------------------------------------------
- (void)orderRefuseWithOrderID:(NSString *)orderID success:(successBlock)success failure:(failureBlock)failure;

#pragma mark --------------------------- 修改密码 ------------------------------------------
- (void)exchangePasswordWithOld:(NSString *)oldPasswd new:(NSString *)newPasswd success:(successBlock)success failure:(failureBlock)failure;



@end
